add_definitions(-DBT_THREAD_SAFE)
add_compile_options(-w)

if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/bullet3/CMakeLists.txt)
    message(FATAL_ERROR "bullet3 submodule not found! Please run: git submodule update --init --recursive")
endif()
add_subdirectory(bullet3)
add_subdirectory(bullet3/HACD)

file (GLOB ZEN_RIGID_SOURCE *.cpp *.h)
target_sources(zeno PRIVATE ${ZEN_RIGID_SOURCE})
target_include_directories(zeno PRIVATE .)
target_include_directories(zeno PRIVATE bullet3/src)

target_link_libraries(zeno PRIVATE LinearMath)
target_link_libraries(zeno PRIVATE Bullet3Common)
target_link_libraries(zeno PRIVATE BulletInverseDynamics)
target_link_libraries(zeno PRIVATE BulletCollision)
target_link_libraries(zeno PRIVATE BulletDynamics)
target_link_libraries(zeno PRIVATE BulletSoftBody)
target_link_libraries(zeno PRIVATE HACD)
target_link_libraries(zeno PRIVATE VHACD)
target_link_libraries(zeno PRIVATE BussIK)
target_link_libraries(zeno PRIVATE URDFImporter)
